# Copyright(c) 2008 Tri Tech Information Systems Inc. 
# Distributed under the Boost Software License, Version 1.0.
#     (See accompanying file ../../LICENSE_1_0.txt or copy at
#           http://www.boost.org/LICENSE_1_0.txt)
#     
def access_test():
    """
    >>> from interface import *
    >>> obj = SomeClass()
    >>> obj.public_m()
    1
    >>> obj.protected_m()
    2
    >>> class X(SomeClass):
    ...     pass
    >>> o = X()
    >>> o.protected_m()
    2
    >>> o.protected_v = 5
    >>> o.protected_v
    5
    >>> obj = SomeClass.factory()
    >>> obj.public_m()
    1
    >>> obj.protected_m()
    Traceback (most recent call last):
        ...
    ArgumentError: Python argument types in
        SomeClass.protected_m(SomeClass)
    did not match C++ signature:
        ...
    >>> obj.protected_v = 9
    >>> obj.protected_v
    9
    """

if __name__ == '__main__':
    import doctest
    import sys
    sys.exit(doctest.testmod(optionflags = doctest.ELLIPSIS)[0])

